package com.bt.lms.ui.action.teaching.plan;

import com.bt.lms.ui.page.common.action.pageteaching.TeachingPlanLabAction;
import com.bt.lms.ui.page.teaching.plan.PageRelevanceCourse;
import com.bt.lms.ui.page.teaching.plan.PageTeachingPlanBasicInfoList;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.layout.Pane;

/**
 * 教学计划
 * 新增关联课程按钮事件
 * @author 李舒淇
 */
public class LTeachingPlanAddCourseBtnAction implements EventHandler {

    private PageTeachingPlanBasicInfoList plan;
    public LTeachingPlanAddCourseBtnAction(PageTeachingPlanBasicInfoList pageTeachingPlanBasicInfo) {
        this.plan = pageTeachingPlanBasicInfo;
    }

    @Override
    public void handle(Event event) {

        PageRelevanceCourse pageRelevanceCourse = new PageRelevanceCourse();
        Pane pane = TeachingPlanLabAction.pageSkipInfo.getPane();
        Integer index = TeachingPlanLabAction.pageSkipInfo.getIndex();
        pane.getChildren().set(index,pageRelevanceCourse);

    }
}
